import App from './App'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false

import reqUrl from "./common/reqUrl"
Vue.prototype.serverUrl = reqUrl

import regX from './common/regX'
Vue.prototype.regX = regX

import request from "./common/request";
Vue.prototype.$http = request

import User from "./common/user"
Vue.prototype.User = User

import util from './common/util.js'
Vue.prototype.util = util

import crypto from './common/crypto.js'
Vue.prototype.crypto = crypto;

Vue.prototype.limit = 15;

Vue.prototype.wxMpAppId = process.env.NODE_ENV == 'development' ? 'wxa8449889ef04164b' : 'wx8970fbd4831f5b47';

Vue.prototype.cloudUrl = process.env.NODE_ENV === 'development' ? 'https://test-1309823386.cos.ap-beijing.myqcloud.com/' : 'https://hxy2022-1309823386.cos.ap-beijing.myqcloud.com/'
Vue.prototype.kfTel = '400-009-6079';
Vue.prototype.ossUrl = 'https://hxy2022-1309823386.cos.ap-beijing.myqcloud.com/'
Vue.prototype.getCloudFilePath = function(url){
	if(url != undefined){
		if(url.startsWith('https')){
			return url
		}else{
			return Vue.prototype.cloudUrl + url
		} 
	}
}

App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif